#ifndef MINER_HPP
#define MINER_HPP

#include <SmegCore/Entity/BaseObject.hpp>
#include <SmegCore/Game/StateMachine.hpp>
#include <SmegCore/Game/MessageInfo.hpp>

#define THIRST_MAX      3
#define FATIGUE_MAX     4

#define POCKET_MAX      3
#define WEALTH_MIN      5

class Miner : public smeg::core::BaseObject {
private:
    smeg::core::StateMachine< Miner >*  m_pStateMachine;
    smeg::core::BaseObject*             m_pWife;

    int             m_iThirst;
    int             m_iFatigue;

    int             m_iGoldInPocket;
    int             m_iWealth;

public:
                    Miner();
    virtual         ~Miner();

    DECLARE_CLONE_FUNC( Miner, BaseObject )

    virtual void    Update( float _fDeltaTime );
    virtual bool    HandleMessage( const smeg::core::MessageInfo& _Msg );

    smeg::core::StateMachine< Miner >*  GetStateMachine();

    void                                SetWife( smeg::core::BaseObject* _pWife );
    smeg::core::BaseObject*             GetWife() const;

    bool        IsThirsty() const;
    void        BuyAndDrinkAWhiskey();
    void        IncreaseThirst();

    bool        IsTired() const;
    void        DecreaseFatigue();
    void        IncreaseFatigue();

    bool        ArePocketFull() const;
    int         GetGoldCarried() const;
    void        SetGoldCarried( int _iGold );
    void        AddGoldCarried( int _iGold );
    
    bool        IsWealthy() const;
    int         GetWealth() const;
    void        AddGoldToWealth( int _iGold );
};

#endif // MINER_HPP